// 从服务器获取所有消息的未读数量
import {
  getFanUnreadNumAPI,
  getLikeUnreadNumAPI,
  getCommentUnreadNumAPI,
  getAtUnreadNumAPI
} from '@/api/notifications/notifications'
  // 从服务器获取所有消息的未读数量
export async function fetchAllMessageUnreadNums(userId) {
  const [
    fanUnreadNumRes,
    likeUnreadNumRes,
    commentUnreadNumRes,
    atUnreadNumRes
  ] = await Promise.all([
    getFanUnreadNumAPI(userId),
    getLikeUnreadNumAPI(userId),
    getCommentUnreadNumAPI(userId),
    getAtUnreadNumAPI(userId)
  ])
  return {
    fanUnreadNum: fanUnreadNumRes.data,
    likeUnreadNum: likeUnreadNumRes.data,
    commentUnreadNum: commentUnreadNumRes.data,
    atUnreadNum: atUnreadNumRes.data
  }
}